namespace Brjnk.GpxExplorer.Workspace.BitmapExport
{
    using System.Windows;

    /// <summary>
    /// </summary>
    public class CreatorLabel : LabelBase
    {
        public CreatorLabel(Page page, LabelStyle labelStyle)
            : base(page, labelStyle)
        {
            Init();
            LockTargetPoint();
        }

        private System.Windows.Point GetTargetPoint()
        {
            return new Point(0, Page.Height);
        }

        protected override void OnPageSizeChanged()
        {
            OnPropertyChanged("TargetPoint");
            UnlockTargetPoint();
            TargetPoint = GetTargetPoint();
            LockTargetPoint();
        }

        protected override void SetContentMargin()
        {
            base.ContentMargin = new Thickness(5, 5, 5, 5);
        }

        protected override void SetSize()
        {
            base.SizeLeft = 0;
            base.SizeBottom = 0;
            base.SizeRight = ContentWidth;
            base.SizeTop = ContentHeight;
            base.Width = ContentWidth;
            base.Height = ContentHeight;
        }
    }
}